#ifndef _HELIX_FILE_UTIL_TESTS_H_
#define _HELIX_FILE_UTIL_TESTS_H_

// ImageTests.h
#include <cxxtest/TestSuite.h>
#include "../Helix/Log.h"
#include "../Helix/HObject.h"
#include "../Helix/Util/FileUtil.h"

using namespace helix;

class FileUtilTest : public CxxTest::TestSuite
{
public:

	void setUp()
	{
		printf("\n\nFileUtilTest::");
	}

	void tearDown()
	{
	}

	//
	void testDirectoryList( void )
	{
		printf("testDirectoryList\n");

		DirectoryList dList = DirectoryList(".\\*");

		TS_ASSERT_EQUALS(DirectoryList::SUCCESS,dList.successCode());
		TS_ASSERT(dList.getSize()>0);
		TS_ASSERT(strcmp(dList.getFile(0),"."));
		TS_ASSERT(strcmp(dList.getFile(1),".."));
	}

	void testDirectoryListNoFiles( void )
	{
		printf("testDirectoryList\n");

		DirectoryList dList = DirectoryList(".\\somethings*");

		TS_ASSERT_EQUALS(DirectoryList::FAILURE,dList.successCode());
		TS_ASSERT_EQUALS(0,dList.getSize());
	}

	void testTextFileContent( void )
	{
		printf("testTextFileContent\n");
		TextFileContent fileContent("HelixTests/testdata/testTextFile.txt");

		TS_ASSERT_EQUALS(true,fileContent.successfulRead());
		TS_ASSERT_EQUALS(0,strcmp("This is a test text file.",fileContent.getContent()));
	}

	void testTextFileContentUnsuccessfulLoad( void )
	{
		printf("testTextFileContentUnsuccessfulLoad\n");
		TextFileContent fileContent("aFileThatDoesNotExist.txt");

		TS_ASSERT_EQUALS(false,fileContent.successfulRead());
	}


};

#endif